The son of a police captain has been arrested in an FBI sting and accused of plotting to commit terrorist acts in support of the Islamic State group.